﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {

            string sql1 = "select top 5notID,notTitle,notTop,notTime from Notice_Info where notIsShow=1 order by notTop desc,notTime desc";
            string sql2 = "select top 5 dowID,dowTitle from Download_Info";
            string sql3 = "select top 7 friName,friUrl from Friend_Link";
            string sql4 = "select top 7 newsID,newsTitle from News_Info";
            string sql5 = "select iimName,iimTitle,iimUrl,iimID from Index_Image";
            string sql6 = " select top 7 teaID,teaName from Teacher_Info";

            rptNotice.DataSource = DataAccess.GetDataTable(sql1, null);
            rptDown.DataSource = DataAccess.GetDataTable(sql2, null);
            rptFri.DataSource = DataAccess.GetDataTable(sql3, null);
            rptNews.DataSource = DataAccess.GetDataTable(sql4, null);
            rptImg.DataSource = DataAccess.GetDataTable(sql5, null);
            rptTea.DataSource = DataAccess.GetDataTable(sql6, null);
            rptNotice.DataBind();
            rptDown.DataBind();
            rptFri.DataBind();
            rptNews.DataBind();
            rptImg.DataBind();
            rptTea.DataBind();
          
        }
    }
}